<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>EasyRTC Documentation</title>
  <script src="scripts/prettify/prettify.js"> </script>
  <script src="scripts/prettify/lang-css.js"> </script>
  <!--[if lt IE 9]>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  <link href="../assets/easyrtc-docs-jsdoc-styles-1.css" media="all" rel="stylesheet" />
</head>
<body>
<header class="template">
	<div class="wrapper-content">
    <a href="../index.html"><img src="../assets/easyrtc-logo.png" alt="EasyRTC Documentation"></a>
		<h1 title="EasyRTC Documentation">Documentation</h1>
	</div>
</header>
<div class="wrapper-docs">
<nav>
	<h2><a href="../index.html">Docs Home</a></h2>
	<h3>EasyRTC Guides</h3>
	<ul>
		<li><a href="../easyrtc_faq.html">FAQ</a></li>
		<li><a href="../easyrtc_gettingStarted.html">Getting Started</a></li>
		<li><a href="../easyrtc_server_install.html">EasyRTC Server: Installation</a></li>
		<li><a href="../easyrtc_client_tutorial.html">EasyRTC Framework Tutorial</a></li>
		<li><a href="../easyrtc_rooms.html">Rooms</a></li>
		<li><a href="../easyrtc_server_configuration.html">EasyRTC Server: Configuration</a></li>
		<li><a href="../easyrtc_server_events.html">EasyRTC Server: Events</a></li>
		<li><a href="../easyrtc_server_ice.html">EasyRTC Server: ICE Configuration</a></li>
		<li><a href="../easyrtc_with_other_servers.html">Using Alongside Other Servers</a></li>
		<li><a href="../easyrtc_server_ssl.html">EasyRTC Server: Using SSL</a></li>
		<li><a href="../easyrtc_webrtc_problems.html">WebRTC Problems and Possible Fixes</a></li>
		<li><a href="../easyrtc_upcoming_features.html">Upcoming Features</a></li>
		<li><a href="../easyrtc_changelog.html">Change Log</a></li>
	</ul>
	<h3>EasyRTC Client Classes</h3>
	<ul>
		<li><a href="../client-api/Easyrtc.html">Easyrtc</a></li>
		<li><a href="../client-api/Easyrtc_App.html">Easyrtc_App</a></li>
		<li><a href="../client-api/Easyrtc_ft.html">Easyrtc_ft</a></li>
		<li><a href="../client-api/Easyrtc_IframeCapture.html">Easyrtc_IframeCapture</a></li>
		<li><a href="../client-api/Easyrtc_No_IframeCapture.html">Easyrtc_No_IframeCapture</a></li>
		<li><a href="../client-api/Easyrtc_Rates.html">Easyrtc_Rates</a></li>
		<li><a href="../client-api/Easyrtc_Recorder.html">Easyrtc_Recorder</a></li>
	</ul>
	<h3>EasyRTC Server Modules</h3>
	<ul>
		<li><a href="../server-api/module-easyrtc_default_event_listeners.html">easyrtc_default_event_listeners</a></li>
		<li><a href="../server-api/module-easyrtc_default_options.html">easyrtc_default_options</a></li>
		<li><a href="../server-api/module-easyrtc_private_obj.html">easyrtc_private_obj</a></li>
		<li><a href="../server-api/module-easyrtc_public_obj.html">easyrtc_public_obj</a></li>
		<li><a href="../server-api/module-easyrtc_util.html">easyrtc_util</a></li>
		<li><a href="../server-api/module-general_util.html">general_util</a></li>
	</ul>
	<h3>EasyRTC Server Classes</h3>
	<ul>
		<li><a href="../server-api/module-easyrtc_default_event_listeners-eventListener.html">eventListener</a></li>
		<li><a href="../server-api/module-easyrtc_public_obj-pub.html">pub</a></li>
		<li><a href="../server-api/module-easyrtc_public_obj-pub.events.html">events</a></li>
		<li><a href="../server-api/module-easyrtc_public_obj-pub.util.html">util</a></li>
		<li><a href="../server-api/module-easyrtc_util-eu.html">eu</a></li>
		<li><a href="../server-api/module-general_util-g.html">g</a></li>
		<li><a href="../server-api/pub.appObj.html">appObj</a></li>
		<li><a href="../server-api/pub.appObj.connectionObj.html">connectionObj</a></li>
		<li><a href="../server-api/pub.appObj.connectionObj.connectionRoomObj.html">connectionRoomObj</a></li>
		<li><a href="../server-api/pub.appObj.roomObj.html">roomObj</a></li>
		<li><a href="../server-api/pub.appObj.sessionObj.html">sessionObj</a></li>
	</ul>
</nav>
<div class="easyrtc-docs-content">
<div id="main">
  <h1 class="page-title">Class: pub</h1>
  




<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="module-easyrtc_public_obj.html">easyrtc_public_obj</a>~</span>pub</h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="pub"><span class="type-signature"></span>new pub<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    The public object which is returned by the EasyRTC listen() function. Contains all public methods for interacting with EasyRTC server.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line26">line 26</a>
    </li></ul></dd>
    

    

    

    
</dl>
















    
    </div>

    

    

    
        <h3 class="subsection-title">Classes</h3>

        <dl>
            <dt><a href="module-easyrtc_public_obj-pub.events.html">events</a></dt>
            <dd></dd>
        
            <dt><a href="module-easyrtc_public_obj-pub.util.html">util</a></dt>
            <dd></dd>
        </dl>
    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id=".events.defaultListeners"><span class="type-signature">(static) </span>events.defaultListeners<span class="type-signature"></span></h4>




<div class="description">
    Map of EasyRTC event listener names to their default functions. This map can be used to run a default function manually.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line256">line 256</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id=".events.emit"><span class="type-signature">(static) </span>events.emit<span class="type-signature"></span></h4>




<div class="description">
    Expose event listener's emit function.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line206">line 206</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id=".util.ApplicationError"><span class="type-signature">(static) </span>util.ApplicationError<span class="type-signature"></span></h4>




<div class="description">
    Custom Error Object for EasyRTC Application Errors.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line370">line 370</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id=".util.ApplicationWarning"><span class="type-signature">(static) </span>util.ApplicationWarning<span class="type-signature"></span></h4>




<div class="description">
    Custom Error Object for EasyRTC Application Warnings.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line380">line 380</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".app"><span class="type-signature">(static) </span>app<span class="signature">(appName<span class="signature-attributes">nullable</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Contains the methods for interfacing with an EasyRTC application.The callback will receive an application object upon successful retrieval of application.The callback may receive an Error object if unsuccessful. Depending on the severity, known errors have an "instanceof" ApplicationWarning or ApplicationError.The function does return an application object which is useful for chaining, however the callback approach is safer and provides additional information in the event of an error.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>appName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Application name which uniquely identifies it on the server. Uses default application if null.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">appCallback</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Callback with error and application object</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1180">line 1180</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".createApp"><span class="type-signature">(static) </span>createApp<span class="signature">(appName, options<span class="signature-attributes">nullable</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Creates a new EasyRTC application with default values. If a callback is provided, it will receive the new application object.The callback may receive an Error object if unsuccessful. Depending on the severity, known errors have an "instanceof" ApplicationWarning or ApplicationError.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>appName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Application name which uniquely identifies it on the server.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">object</span>


            
            </td>

            
                <td class="attributes">
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Options object with options to apply to the application. May be null.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">appCallback</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Callback with error and application object</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1088">line 1088</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".events.emitDefault"><span class="type-signature">(static) </span>events.emitDefault<span class="signature">(eventName, &hellip;eventParam)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Runs the default EasyRTC listener for a given event.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">EasyRTC event name.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>eventParam</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                    &lt;repeatable><br>
                
                </td>
            

            

            <td class="description last">The event parameters</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line215">line 215</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".events.on"><span class="type-signature">(static) </span>events.on<span class="signature">(eventName, listener)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sets listener for a given EasyRTC event. Only one listener is allowed per event. Any other listeners for an event are removed before adding the new one. See the events documentation for expected listener parameters.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">Listener name.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>listener</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Function to be called when listener is fired</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line292">line 292</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".events.removeAllListeners"><span class="type-signature">(static) </span>events.removeAllListeners<span class="signature">(eventName<span class="signature-attributes">nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Removes all listeners for an event. If there is a default EasyRTC listener, it will be added. If eventName is `null`, all events will be removed than the defaults will be restored.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Listener name. If `null`, then all events will be removed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line308">line 308</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".events.setDefaultListener"><span class="type-signature">(static) </span>events.setDefaultListener<span class="signature">(eventName)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Resets the listener for a given event to the default listener. Removes other listeners.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>eventName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">EasyRTC event name.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line229">line 229</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".events.setDefaultListeners"><span class="type-signature">(static) </span>events.setDefaultListeners<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Resets the listener for all EasyRTC events to the default listeners. Removes all other listeners.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line241">line 241</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".getAppNames"><span class="type-signature">(static) </span>getAppNames<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sends an array of all application names to a callback.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback with error and array containing all application names.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line51">line 51</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".getAppWithEasyrtcid"><span class="type-signature">(static) </span>getAppWithEasyrtcid<span class="signature">(easyrtcid, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Gets app object for application which has an authenticated client with a given easyrtcid
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">Unique identifier for an EasyRTC connection.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback with error and application object</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line66">line 66</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".getConnectionCount"><span class="type-signature">(static) </span>getConnectionCount<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sends the count of the number of connections to the server to a provided callback.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback with error and array containing all easyrtcids.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line83">line 83</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".getConnectionCountSync"><span class="type-signature">(static) </span>getConnectionCountSync<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4>

    



<div class="description">
    Sends the count of the number of connections to the server to a provided callback.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line93">line 93</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The current number of connections in a room.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getConnectionWithEasyrtcid"><span class="type-signature">(static) </span>getConnectionWithEasyrtcid<span class="signature">(easyrtcid, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Gets connection object for connection which has an authenticated client with a given easyrtcid
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">EasyRTC unique identifier for a socket connection.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback with error and connection object</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line108">line 108</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".getOption"><span class="type-signature">(static) </span>getOption<span class="signature">(optionName)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Gets individual option value. The option value returned is for the server level.Note that some options can be set at the application or room level. If an option has not been set at the room level, it will check to see if it has been set at the application level, if not it will revert to the server level.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>optionName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">Option name</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line134">line 134</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    Option value (can be any JSON type)
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".getVersion"><span class="type-signature">(static) </span>getVersion<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>

    



<div class="description">
    Gets EasyRTC Version. The format is in a major.minor.patch format with an optional letter following denoting alpha or beta status. The version is retrieved from the package.json file located in the EasyRTC project root folder.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line148">line 148</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    EasyRTC Version
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".isApp"><span class="type-signature">(static) </span>isApp<span class="signature">(appName, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Determine if a given application name has been defined.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>appName</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">Application name which uniquely identifies it on the server.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback with error and boolean of whether application is defined.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1074">line 1074</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".setOption"><span class="type-signature">(static) </span>setOption<span class="signature">(optionName, optionValue)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    



<div class="description">
    Sets individual option. The option value set is for the server level.Note that some options can be set at the application or room level. If an option has not been set at the room level, it will check to see if it has been set at the application level, if not it will revert to the server level.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>optionName</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Option name</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>optionValue</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Option value</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line173">line 173</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    true on success, false on failure
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.ConnectionError"><span class="type-signature">(static) </span>util.ConnectionError<span class="signature">(msg)</span><span class="type-signature"> &rarr; {Error}</span></h4>

    



<div class="description">
    Custom Error Object for EasyRTC C Errors.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">Text message describing the error.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line391">line 391</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Error</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.ConnectionWarning"><span class="type-signature">(static) </span>util.ConnectionWarning<span class="signature">(msg)</span><span class="type-signature"> &rarr; {Error}</span></h4>

    



<div class="description">
    Custom Error Object for EasyRTC Connection Warnings.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">Text message describing the error.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line401">line 401</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Error</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.deepCopy"><span class="type-signature">(static) </span>util.deepCopy<span class="signature">(input)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Performs a deep copy of an object, returning the duplicate.Do not use on objects with circular references.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>input</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Input variable (or object) to be copied.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line332">line 332</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    New copy of variable.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.getAvailableEasyrtcid"><span class="type-signature">(static) </span>util.getAvailableEasyrtcid<span class="signature">()</span><span class="type-signature"> &rarr; {String}</span></h4>

    



<div class="description">
    Returns a random available easyrtcid.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line432">line 432</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    Available easyrtcid. A unique identifier for an EasyRTC connection.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">String</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.getErrorMsg"><span class="type-signature">(static) </span>util.getErrorMsg<span class="signature">(errorCode)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Returns an EasyRTC message error object for a specific error code. This is meant to be emitted or returned to a websocket client.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>errorCode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">EasyRTC error code associated with an error.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line441">line 441</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    EasyRTC message error object for the specific error code.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.getErrorText"><span class="type-signature">(static) </span>util.getErrorText<span class="signature">(errorCode)</span><span class="type-signature"> &rarr; {string}</span></h4>

    



<div class="description">
    Returns human readable text for a given error code. If an unknown error code is provided, a null value will be returned.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>errorCode</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">EasyRTC error code associated with an error.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line466">line 466</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    Human readable error string
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">string</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.isError"><span class="type-signature">(static) </span>util.isError<span class="signature">(Will)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    



<div class="description">
    Determines if an Error object is an instance of ApplicationError, ConnectionError, or ServerError. If it is, it will return true.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>Will</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>
|

<span class="param-type">Error</span>


            
            </td>

            

            

            <td class="description last">accept any value, but will only return true for appropriate error objects.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line350">line 350</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.isValidIncomingMessage"><span class="type-signature">(static) </span>util.isValidIncomingMessage<span class="signature">(type, msg, appObj<span class="signature-attributes">nullable</span>, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Checks an incoming EasyRTC message to determine if it is syntactically valid.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The Socket.IO message type. Expected values are (easyrtcAuth|easyrtcCmd|easyrtcMsg)</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Message object which contains the full message from a client; this can include the standard msgType and msgData fields.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appObj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">EasyRTC application object. Contains methods used for identifying and managing an application.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Callback with error, a boolean of whether message if valid, and a string indicating the error code if the message is invalid.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line712">line 712</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.isWarning"><span class="type-signature">(static) </span>util.isWarning<span class="signature">(Will)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    



<div class="description">
    Determines if an Error object is an instance of ApplicationWarning, ConnectionWarning, or ServerWarning. If it is, it will return true.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>Will</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>
|

<span class="param-type">Error</span>


            
            </td>

            

            

            <td class="description last">accept any value, but will only return true for appropriate error objects.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line360">line 360</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.log"><span class="type-signature">(static) </span>util.log<span class="signature">(level, logText, logFields<span class="signature-attributes">opt, nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    General logging function which emits a log event so long as the log level has a severity equal or greater than e.option.logLevel
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>level</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Log severity level. Can be ("debug"|"info"|"warning"|"error")</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logText</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Text for log.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logFields</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Simple JSON object which contains extra fields to be logged.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line554">line 554</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.logDebug"><span class="type-signature">(static) </span>util.logDebug<span class="signature">(logText, logFields<span class="signature-attributes">opt, nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Convenience function for logging "debug" level items.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>logText</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Text for log.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logFields</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Simple JSON object which contains extra fields to be logged.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line583">line 583</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.logError"><span class="type-signature">(static) </span>util.logError<span class="signature">(logText, logFields<span class="signature-attributes">opt, nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Convenience function for logging "error" level items.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>logText</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Text for log.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logFields</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Simple JSON object which contains extra fields to be logged.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line616">line 616</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.logInfo"><span class="type-signature">(static) </span>util.logInfo<span class="signature">(logText, logFields<span class="signature-attributes">opt, nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Convenience function for logging "info" level items.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>logText</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Text for log.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logFields</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Simple JSON object which contains extra fields to be logged.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line594">line 594</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.logWarning"><span class="type-signature">(static) </span>util.logWarning<span class="signature">(logText, logFields<span class="signature-attributes">opt, nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Convenience function for logging "warning" level items.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>logText</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Text for log.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>logFields</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">Simple JSON object which contains extra fields to be logged.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line605">line 605</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.nextToNowhere"><span class="type-signature">(static) </span>util.nextToNowhere<span class="signature">(err)</span><span class="type-signature"></span></h4>

    



<div class="description">
    An empty dummy function, which is designed to be used as a default callback in functions when none has been provided.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>err</code></td>
            

            <td class="type">
            
                
<span class="param-type">Error</span>


            
            </td>

            

            

            <td class="description last">Error object</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line340">line 340</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.sendSessionCookie"><span class="type-signature">(static) </span>util.sendSessionCookie<span class="signature">(req, res)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Will attempt to deliver an EasyRTC session id via a cookie. Requires that session management be enabled from within Express.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>req</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Http request object</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>res</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Http result object</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line1052">line 1052</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.sendSocketCallbackAck"><span class="type-signature">(static) </span>util.sendSocketCallbackAck<span class="signature">(easyrtcid, socketCallback, appObj<span class="signature-attributes">nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sends an 'ack' socket message to a given socketCallback. Provides additional checking and logging.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">EasyRTC unique identifier for a socket connection.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Socket.io callback function</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appObj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">EasyRTC application object. Contains methods used for identifying and managing an application.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line628">line 628</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.sendSocketCallbackMsg"><span class="type-signature">(static) </span>util.sendSocketCallbackMsg<span class="signature">(easyrtcid, socketCallback, msg, appObj<span class="signature-attributes">nullable</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sends a complete socket message to a given socketCallback. Provides additional checking and logging.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>easyrtcid</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">EasyRTC unique identifier for a socket connection.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>socketCallback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Socket.io callback function</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Message object which contains the full message for a client; this can include the standard msgType and msgData fields.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>appObj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                
                    &lt;nullable><br>
                

                
                </td>
            

            

            <td class="description last">EasyRTC application object. Contains methods used for identifying and managing an application.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line641">line 641</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".util.ServerError"><span class="type-signature">(static) </span>util.ServerError<span class="signature">(msg)</span><span class="type-signature"> &rarr; {Error}</span></h4>

    



<div class="description">
    Custom Error Object for EasyRTC Server Errors.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">Text message describing the error.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line412">line 412</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Error</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.ServerWarning"><span class="type-signature">(static) </span>util.ServerWarning<span class="signature">(msg)</span><span class="type-signature"> &rarr; {Error}</span></h4>

    



<div class="description">
    Custom Error Object for EasyRTC Server Warnings.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>msg</code></td>
            

            <td class="type">
            
                
<span class="param-type">string</span>


            
            </td>

            

            

            <td class="description last">Text message describing the error.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line423">line 423</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Error</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".util.updateCheck"><span class="type-signature">(static) </span>util.updateCheck<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Checks with EasyRTC site for latest version. Writes to the log if a version can be found. If connection cannot be established than no error will be shown.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="easyrtc_public_obj.js.html">easyrtc_public_obj.js</a>, <a href="easyrtc_public_obj.js.html#line677">line 677</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
    

    

    
</article>

</section>




</div>
<nav class="hide"><h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-easyrtc_default_event_listeners.html">easyrtc_default_event_listeners</a></li><li><a href="module-easyrtc_default_options.html">easyrtc_default_options</a></li><li><a href="module-easyrtc_private_obj.html">easyrtc_private_obj</a></li><li><a href="module-easyrtc_public_obj.html">easyrtc_public_obj</a></li><li><a href="module-easyrtc_util.html">easyrtc_util</a></li><li><a href="module-general_util.html">general_util</a></li></ul><h3>Classes</h3><ul><li><a href="module-easyrtc_default_event_listeners-eventListener.html">eventListener</a></li><li><a href="module-easyrtc_public_obj-pub.html">pub</a></li><li><a href="module-easyrtc_public_obj-pub.events.html">events</a></li><li><a href="module-easyrtc_public_obj-pub.util.html">util</a></li><li><a href="module-easyrtc_util-eu.html">eu</a></li><li><a href="module-general_util-g.html">g</a></li><li><a href="pub.appObj.html">appObj</a></li><li><a href="pub.appObj.connectionObj.html">connectionObj</a></li><li><a href="pub.appObj.connectionObj.connectionRoomObj.html">connectionRoomObj</a></li><li><a href="pub.appObj.roomObj.html">roomObj</a></li><li><a href="pub.appObj.sessionObj.html">sessionObj</a></li></ul></nav>		
	</div>
</div>
<footer class="template">
	<div class="wrapper-content">
		<p>Copyright &copy;2016 EasyRTC</p>
	</div>
</footer>
<!-- <script>prettyPrint();</script> -->
<!-- <script src="scripts/linenumber.js"></script> -->
</body>
</html>